#include <format>
#include <iostream>

class Spreadsheet {

public:
  Spreadsheet(Spreadsheet &&src) noexcept { std::swap(*this, src); }
  Spreadsheet &operator=(Spreadsheet &&rhs) noexcept {
    std::swap(*this, rhs);
    return *this;
  }

private:
  void cleanup() noexcept;
  void moveFrom(Spreadsheet &src) noexcept {}
};

void handleMessage(std::string &msg) {
  std::cout << std::format("handleMessage with lvalue reference:{}", msg)
            << std::endl;
}

void handleMessage(std::string &&msg) {
  std::cout << std::format("handleMessage with rvalue reference:{}", msg)
            << std::endl;
}
int main() {
  {
    std::string s1{"hello"};
    handleMessage(std::move(s1));
  }
  std::string s1{"hello"};
  handleMessage(s1);

  std::string s2{"world!"};
  handleMessage(s1 + s2);
}